package com.yz.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface StatisticMapper {
	public void updateStaInfoNum(int rid);
	
	@Insert("insert into statistic (readRoomId,time,peopleNum) " + 
			"select readRoomId as rid,date_format(inTime,'%Y-%m-%d') " + 
			"as shijian ,count(*) from dailylog " + 
			"group by shijian,rid " + 
			"having shijian = date_format(date_sub(curdate(),interval 1 day),'%Y-%m-%d')")
	public boolean insert();
	
	/**
	 * 获取人数
	 * @return
	 */
	List<Integer> getPeopleNum(@Param("min")String min,@Param("max")String max);
	/**
	 * 获取阅览室名称
	 * @return
	 */
	List<String> getReadroomName(@Param("min")String min,@Param("max")String max);
}
